/*   time:2019-06-13 20:39:24*/
var a = getApp(),
    t = a.requirejs("core"),
    e = a.requirejs("biz/order"),
    m = a.requirejs("foxui"),
    s = a.requirejs("jquery");
Page({
    data: {
        info:{}
    },
    onLoad: function(t) {
        this.setData({
            options: t
        }), a.url(t), this.get_list()
    },
    onShow: function() {
        this.get_list();
    },
    get_list: function() {
        var n = this;
        t.get("order/detail", n.data.options, function(a) {
            if (0 < a.error && (5e4 != a.error && t.toast(a.message, "loading"), wx.redirectTo({
                url: "/pages/order/index"
            })), null != a.nogift[0].fullbackgoods) {
                
            }
            if (0 == a.error) {
                a.show = !0;
                var o = Array.isArray(a.ordervirtual);
                n.setData(a), n.setData({
                    ordervirtualtype: o,
                    fullbackgoods: a.nogift[0].fullbackgoods,
                    invoice: a.order.invoicename,
                    membercard_info: a.membercard_info
                })
            }
        })
    },
    onChange: function(a) {
        var e = {};
        e[t.data(a).name] = a.detail.value, this.setData(e)
    },
   
    submit: function() {
        var l = this;
        var a = {
            id: this.data.options.id,
            kd_ordersn: this.data.kd_ordersn,
            kd_name: this.data.kd_name,
            sendback_desc: this.data.sendback_desc,
            sendback_jjr: this.data.sendback_jjr,
            sendback_mobile: this.data.sendback_mobile,
        }; 
        
        t.post("order/send_back", a, function(a) {
            console.log(a);
            0 == a.error ? wx.navigateBack({
                delta: 1
            }) : t.toast(a.message, "loading")
        }, !0)
    },
   
});